// 获取学校结构

import axios from "axios";

export default function () {
    return axios({
        method: "get",
        url: "/api/users/collegeInfo",
    }).then(response => {
        return {
            result: true,
            colleges: response.data.colleges,
            grades: response.data.grades
        }
    }).catch(error => {
        let msg;
        if (error.response) {
            msg = error.response.data.msg();
        } else {
            msg = error;
        }
        return {
            result: false,
            data: msg
        }
    });
}